3.328 \(\int \tan (c+d x) (a+i a \tan (c+d x))^m \, dx\)

Optimal. Leaf size=70 \[ \frac {(a+i a \tan (c+d x))^m}{d m}-\frac {(a+i a \tan (c+d x))^m \, _2F_1\left (1,m;m+1;\frac {1}{2} (i \tan (c+d x)+1)\right )}{2 d m} \]

[Out]

(a+I*a*tan(d*x+c))^m/d/m-1/2*hypergeom([1, m],[1+m],1/2+1/2*I*tan(d*x+c))*(a+I*a*tan(d*x+c))^m/d/m

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 70, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {3527, 3481, 68} \[ \frac {(a+i a \tan (c+d x))^m}{d m}-\frac {(a+i a \tan (c+d x))^m \, _2F_1\left (1,m;m+1;\frac {1}{2} (i \tan (c+d x)+1)\right )}{2 d m} \]

Antiderivative was successfully verified.

[In]

Int[Tan[c + d*x]*(a + I*a*Tan[c + d*x])^m,x]

[Out]

(a + I*a*Tan[c + d*x])^m/(d*m) - (Hypergeometric2F1[1, m, 1 + m, (1 + I*Tan[c + d*x])/2]*(a + I*a*Tan[c + d*x]
)^m)/(2*d*m)

Rule 68

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((b*c - a*d)^n*(a + b*x)^(m + 1)*Hype
rgeometric2F1[-n, m + 1, m + 2, -((d*(a + b*x))/(b*c - a*d))])/(b^(n + 1)*(m + 1)), x] /; FreeQ[{a, b, c, d, m
}, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] && IntegerQ[n]

Rule 3481

Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Dist[b/d, Subst[Int[(a + x)^(n - 1)/(a - x), x]
, x, b*Tan[c + d*x]], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[a^2 + b^2, 0]

Rule 3527

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(d*
(a + b*Tan[e + f*x])^m)/(f*m), x] + Dist[(b*c + a*d)/b, Int[(a + b*Tan[e + f*x])^m, x], x] /; FreeQ[{a, b, c,
d, e, f, m}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] &&  !LtQ[m, 0]

Rubi steps

\begin {align*} \int \tan (c+d x) (a+i a \tan (c+d x))^m \, dx &=\frac {(a+i a \tan (c+d x))^m}{d m}-i \int (a+i a \tan (c+d x))^m \, dx\\ &=\frac {(a+i a \tan (c+d x))^m}{d m}-\frac {a \operatorname {Subst}\left (\int \frac {(a+x)^{-1+m}}{a-x} \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=\frac {(a+i a \tan (c+d x))^m}{d m}-\frac {\, _2F_1\left (1,m;1+m;\frac {1}{2} (1+i \tan (c+d x))\right ) (a+i a \tan (c+d x))^m}{2 d m}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 4.92, size = 134, normalized size = 1.91 \[ \frac {2^{m-1} \left (e^{i d x}\right )^m \left (\frac {e^{i (c+d x)}}{1+e^{2 i (c+d x)}}\right )^m \left (m \left (-e^{2 i (c+d x)}\right ) \, _2F_1\left (1,1;m+2;-e^{2 i (c+d x)}\right )+m+1\right ) \sec ^{-m}(c+d x) (\cos (d x)+i \sin (d x))^{-m} (a+i a \tan (c+d x))^m}{d m (m+1)} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[Tan[c + d*x]*(a + I*a*Tan[c + d*x])^m,x]

[Out]

(2^(-1 + m)*(E^(I*d*x))^m*(E^(I*(c + d*x))/(1 + E^((2*I)*(c + d*x))))^m*(1 + m - E^((2*I)*(c + d*x))*m*Hyperge
ometric2F1[1, 1, 2 + m, -E^((2*I)*(c + d*x))])*(a + I*a*Tan[c + d*x])^m)/(d*m*(1 + m)*Sec[c + d*x]^m*(Cos[d*x]
 + I*Sin[d*x])^m)

________________________________________________________________________________________

fricas [F]  time = 0.46, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {\left (\frac {2 \, a e^{\left (2 i \, d x + 2 i \, c\right )}}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}\right )^{m} {\left (-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i\right )}}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)*(a+I*a*tan(d*x+c))^m,x, algorithm="fricas")

[Out]

integral((2*a*e^(2*I*d*x + 2*I*c)/(e^(2*I*d*x + 2*I*c) + 1))^m*(-I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*
c) + 1), x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{m} \tan \left (d x + c\right )\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)*(a+I*a*tan(d*x+c))^m,x, algorithm="giac")

[Out]

integrate((I*a*tan(d*x + c) + a)^m*tan(d*x + c), x)

________________________________________________________________________________________

maple [F]  time = 2.12, size = 0, normalized size = 0.00 \[ \int \tan \left (d x +c \right ) \left (a +i a \tan \left (d x +c \right )\right )^{m}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(d*x+c)*(a+I*a*tan(d*x+c))^m,x)

[Out]

int(tan(d*x+c)*(a+I*a*tan(d*x+c))^m,x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{m} \tan \left (d x + c\right )\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)*(a+I*a*tan(d*x+c))^m,x, algorithm="maxima")

[Out]

integrate((I*a*tan(d*x + c) + a)^m*tan(d*x + c), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \mathrm {tan}\left (c+d\,x\right )\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^m \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(c + d*x)*(a + a*tan(c + d*x)*1i)^m,x)

[Out]

int(tan(c + d*x)*(a + a*tan(c + d*x)*1i)^m, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (i a \left (\tan {\left (c + d x \right )} - i\right )\right )^{m} \tan {\left (c + d x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)*(a+I*a*tan(d*x+c))**m,x)

[Out]

Integral((I*a*(tan(c + d*x) - I))**m*tan(c + d*x), x)

________________________________________________________________________________________